#pragma once

namespace ZMH
{
	template<size_t N>
	class bitset
	{
	public:
		bitset()
			:_bs(N / 32 + 1) {}

		bool test(int x)
		{
			int i = x / 32;
			int j = x % 32;

			return _bs[i] & (1 << j);
		}

		void set(int x)
		{
			int i = x / 32;
			int j = x % 32;

			_bs[i] |= 1 << j;

		}
			void reset(int x)
		{
			int i = x / 32;
			int j = x % 32;

			_bs[i] &= ~(1 << j);
		}

	private:
		std::vector<int> _bs;
	};
}
